This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### Keybase proof | |
I hereby claim: | |
* I am michaliskambi on github. | |
* I am michaliskambi (https://keybase.io/michaliskambi) on keybase. | |
* I have a public key whose fingerprint is C8BB 4494 F6E8 7767 34A2 4971 FF74 8D13 B240 711F | |
To claim this, I am signing this object: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ Build at runtime X3D graph with a sphere, translated, with some texture. | |
Then load this into a scene (TCastleScene), and open a window showing it. | |
The default camera (Examine) works, so you can drag and rotate it. | |
Be sure to place test_texture.png file in the same directory, | |
or update the line Texture.FdUrl.Items.Add(...) to point to a correct | |
texture filename / URL. You can use | |
Texture.FdUrl.Items.Add(ApplicationData('texture.png')); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ Based on view_3d_model_basic demo in Castle Game Engine examples. | |
Read a 3D model, change creaseAngle to some constant value | |
(4.0 in this example), and then load it to TCastleScene. | |
(Note that you can also change the VRML/X3D graph after loading | |
to TCastleScene, by using TCastleScene.RootNode property, | |
followed by TCastleScene.ChangedAll call. | |
But doing it before loading, if possible, is a little faster.) } | |
program load_model_fix_crease_angle; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#X3D V3.2 utf8 | |
PROFILE Interchange | |
COMPONENT Rendering:5 | |
# Demo of ClipPlane. | |
# | |
# Based on https://github.com/castle-engine/demo-models/blob/master/x3d/clip_plane.x3dv | |
# but with view3dscene-specific features | |
# (Teapot, Vec4Interpolator using CastleScript) removed, | |
# to work with any VRML/X3D browser. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
uses SysUtils, | |
CastleWindow, CastleScene, X3DNodes, CastleTextureFontData; | |
type | |
TEventHandler = class | |
class procedure CustomizeFont(const FontStyle: TFontStyleNode; | |
var Font: TTextureFontData); | |
end; | |
var |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#X3D V3.2 utf8 | |
PROFILE Interchange | |
# Place this alongside the "car.x3d" file. | |
# Open in any engine example program or view3dscene. | |
# The 1st Viewpoint inside will be automatically bound, | |
# and it will move, along with the car. | |
DEF MovingCar Transform { | |
children [ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
uses SysUtils, | |
CastleControls, CastleWindow, CastleTimeUtils, CastleUIControls, | |
CastleGLImages, CastleVideos; | |
type | |
TMap = class(TUIControlSizeable) | |
private | |
Video: TGLVideo2D; | |
AnimationTime: TFloatTime; | |
public |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ -*- compile-command: "castle-engine simple-compile --mode=debug test_keep_existing.lpr && ./test_keep_existing" -*- } | |
uses SysUtils, X3DNodes; | |
var | |
Texture: TImageTextureNode; | |
TextureProperties: TTexturePropertiesNode; | |
begin | |
TextureProperties := TTexturePropertiesNode.Create; | |
TextureProperties.AnisotropicDegree := 8; | |
TextureProperties.KeepExisting := 1; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// -*- compile-command: "castle-engine simple-compile scene_position_vs_center.lpr" -*- | |
uses SysUtils, CastleVectors, Castle3D, | |
CastleFilesUtils, CastleWindow, CastleSceneCore, CastleScene, | |
CastleUIControls, Castle2DSceneManager; | |
const | |
PositionX = 0; | |
PositionY = 0; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#X3D V3.2 utf8 | |
PROFILE Interchange | |
Shape { | |
appearance Appearance { | |
} | |
geometry QuadSet { | |
coord DEF coord Coordinate { | |
point [ |
OlderNewer