Suspected typos (low priority)

Big thank you for these notes. I addressed many of them, improving docs. I also just implemented TDisk2DNode.InnerRadius :slight_smile:

Known issue: PasDoc documentation doesn’t show inherited members.

The TBorder is documented in TCastleLabel ancestor, TCastleUserInterface, Castle Game Engine: CastleUIControls: Class TCastleUserInterface , but you need to manually search ancestors to find it.

This is already reported and I’d like to tackle it some day (I’m also the maintainer of PasDoc):

It’s mentioned in

It’s used in numerous examples:

  • examples/fonts/test_local_characters/
  • examples/physics/physics_joints_3d/
  • examples/tiled/strategy_game_demo/
  • examples/viewport_and_scenes/position_from_world/
  • examples/viewport_and_scenes/shadow_volumes_whole_scene_manifold/

The rule always is: it is exactly equivalent to create things by code and by editor, just make sure to set the same properties. We have some examples showing the idea, like castle-engine/examples/lazarus/load_model_and_camera_manually/mainf.pas at master · castle-engine/castle-engine · GitHub . Maybe we should document better the correspondence.

Basically, playing with component in the editor also gives you the knowledge about it’s code API. It’s the same as with LCL, Unity etc.

Added, thanks.

In general, indeed I like to make API docs link to manual where appropriate. Let manual and API docs in the end link to each other.

I’d need to see bigger example to say what’s wrong. The code looks OK.

Without knowing the code, I can recommend to prototype in the editor – try to set up exactly the same thing, same values, same properties in editor. You may likely find quicker this way what goes wrong. Editor really doesn’t do anything magic, it sets up the same classes with the same properties – but you will see everything clearer.

You can also try inspector (F8) to debug at runtime, https://www.youtube.com/watch?v=5jBdPdj75yk .

Do you try to assign SomeLabel.CustomFont := UIFont? This will indeed not compile without a typecast, because UIFont doesn’t have to be of TCastleFont class. And you should not need this assignment.

DefaultUIFont - this is internal, only in implementation. I’m unsure why you mention it, and what do you try to do. Same for FallbackFont(small) or DefaultUIFont.Small, I’m admittedly lost what you’re doing, what you want to achieve. If you believe you found a bug, please report a complete reproducible code.

Please show a complete example code to reproduce it.

It should not need FreeType. FreeType is used to read TTF / OTF files. Again, please submit a testcase to reproduce.

Castle Game Engine: CastleScene: Class TCastleText shows Alignment, VerticalAlignment. They are also clearly visible as “Basic” properties in editor – as above, the simple advise is to play and prototype in the editor, even if you later want to instantiate them from code.

I’m not happy with our current blending sorting and its limitations. This is scheduled to be improved soon, I have hopes even for this weekend. Roadmap:Roadmap | Manual | Castle Game Engine .

I don’t know what exactly you did, so I’m not sure what went wrong.

Anyhow, we don’t want more shortcuts and misleading :slight_smile: The appearance node should just be created like any other class,

MyAppearance := TAppearanceNode.Create;

and assigned like any other property,

MyShape.Appearance := Appearance;

Linked. But I agree in that I’m not happy about these pages about X3D nodes. We should move all these things to API docs, and make API docs perfect. We need to focus on one thing, instead the docs for X3D stuff are now somewhat spread between

The way forward is to make API docs perfect, and link to them everywhere.

I do not understand this statement, what did you try to assign to what?

I added SetVertexCount docs, Castle Game Engine: X3DNodes: Class TLineSetNode docs.

Yes, AntiAliasing is mostly just a fancy way to set MultiSampling.

It also controls Nvidia-specific NV_multisample_filter_hint extension of OpenGL. But I hesitate whether this bit is actually useful, which is why I ultimately “chickened out” and didn’t make TCastleControl.AntiAliasing.

For now, just set TCastleControl.MultiSampling. Values like 2,4,8 are worth trying (higher values → more anti-aliasing, but also potentially more costly). Leave MultiSampling at value 1 or 0 (they mean the same) to not have anti-aliasing.

It was easier to make it implemented :slight_smile:

Tested on sample from X3D for Web Authors Examples Archive, Chapter 10 Geometry 2D, Disk 2D .