Skip to content

Commit 802ccc3

Browse files
committed
add default cpp classes which are not generated
1 parent 08e7d58 commit 802ccc3

30 files changed

+2786
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,138 @@
1+
#ifndef XTHREE_ANIMATION_ACTION_HPP
2+
#define XTHREE_ANIMATION_ACTION_HPP
3+
4+
#include "xtl/xoptional.hpp"
5+
#include "xwidgets/xeither.hpp"
6+
#include "xwidgets/xwidget.hpp"
7+
#include "xwidgets/xtransport.hpp"
8+
9+
#include "../base/xenums.hpp"
10+
#include "../base/xthree_types.hpp"
11+
#include "../base/xthree.hpp"
12+
13+
namespace xthree
14+
{
15+
//
16+
// animation_action declaration
17+
//
18+
19+
template<class D>
20+
class xanimation_action : public xw::xwidget<D>
21+
{
22+
public:
23+
//using base_type_1 = xanimation_action_base<D>;
24+
using base_type = xw::xwidget<D>;
25+
using derived_type = D;
26+
27+
void serialize_state(xeus::xjson&, xeus::buffer_sequence&) const;
28+
void apply_patch(const xeus::xjson&, const xeus::buffer_sequence&);
29+
30+
XPROPERTY(xtl::xoptional<xw::xholder<xthree_widget>>, derived_type, mixer);
31+
XPROPERTY(xtl::xoptional<xw::xholder<xthree_widget>>, derived_type, clip);
32+
XPROPERTY(xtl::xoptional<xw::xholder<xthree_widget>>, derived_type, localRoot);
33+
XPROPERTY(bool, derived_type, clampWhenFinished, false);
34+
XPROPERTY(bool, derived_type, enabled, true);
35+
XPROPERTY(std::string, derived_type, loop, "LoopRepeat", xenums::LoopModes);
36+
XPROPERTY(bool, derived_type, paused, false);
37+
XPROPERTY(int, derived_type, repititions, 1e15);
38+
XPROPERTY(double, derived_type, time, 0);
39+
XPROPERTY(double, derived_type, timeScale, 1);
40+
XPROPERTY(double, derived_type, weigth, 1);
41+
XPROPERTY(bool, derived_type, zeroSlopeAtEnd, true);
42+
XPROPERTY(bool, derived_type, zeroSlopeAtStart, true);
43+
44+
// TODO: add repetitions
45+
46+
protected:
47+
48+
xanimation_action();
49+
using base_type::base_type;
50+
51+
private:
52+
53+
void set_defaults();
54+
};
55+
56+
using animation_action = xw::xmaterialize<xanimation_action>;
57+
58+
using animation_action_generator = xw::xgenerator<xanimation_action>;
59+
60+
//
61+
// animation_action implementation
62+
//
63+
64+
template <class D>
65+
inline void xanimation_action<D>::serialize_state(xeus::xjson& state, xeus::buffer_sequence& buffers) const
66+
{
67+
base_type::serialize_state(state, buffers);
68+
69+
xw::set_patch_from_property(mixer, state, buffers);
70+
xw::set_patch_from_property(clip, state, buffers);
71+
xw::set_patch_from_property(localRoot, state, buffers);
72+
xw::set_patch_from_property(clampWhenFinished, state, buffers);
73+
xw::set_patch_from_property(enabled, state, buffers);
74+
xw::set_patch_from_property(loop, state, buffers);
75+
xw::set_patch_from_property(paused, state, buffers);
76+
xw::set_patch_from_property(repititions, state, buffers);
77+
xw::set_patch_from_property(time, state, buffers);
78+
xw::set_patch_from_property(timeScale, state, buffers);
79+
xw::set_patch_from_property(weigth, state, buffers);
80+
xw::set_patch_from_property(zeroSlopeAtEnd, state, buffers);
81+
xw::set_patch_from_property(zeroSlopeAtStart, state, buffers);
82+
}
83+
84+
template <class D>
85+
inline void xanimation_action<D>::apply_patch(const xeus::xjson& patch, const xeus::buffer_sequence& buffers)
86+
{
87+
base_type::apply_patch(patch, buffers);
88+
89+
xw::set_property_from_patch(mixer, patch, buffers);
90+
xw::set_property_from_patch(clip, patch, buffers);
91+
xw::set_property_from_patch(localRoot, patch, buffers);
92+
xw::set_property_from_patch(clampWhenFinished, patch, buffers);
93+
xw::set_property_from_patch(enabled, patch, buffers);
94+
xw::set_property_from_patch(loop, patch, buffers);
95+
xw::set_property_from_patch(paused, patch, buffers);
96+
xw::set_property_from_patch(repititions, patch, buffers);
97+
xw::set_property_from_patch(time, patch, buffers);
98+
xw::set_property_from_patch(timeScale, patch, buffers);
99+
xw::set_property_from_patch(weigth, patch, buffers);
100+
xw::set_property_from_patch(zeroSlopeAtEnd, patch, buffers);
101+
xw::set_property_from_patch(zeroSlopeAtStart, patch, buffers);
102+
}
103+
104+
template <class D>
105+
inline xanimation_action<D>::xanimation_action()
106+
: base_type()
107+
{
108+
set_defaults();
109+
}
110+
111+
template <class D>
112+
inline void xanimation_action<D>::set_defaults()
113+
{
114+
this->_model_name() = "AnimationActionModel";
115+
this->_model_module() = "jupyter-threejs";
116+
this->_model_module_version() = "1.0.0-beta.3";
117+
this->_view_name() = "AnimationActionView";
118+
this->_view_module() = "jupyter-threejs";
119+
this->_view_module_version() = "1.0.0-beta.3";
120+
}
121+
}
122+
123+
/*********************
124+
* precompiled types *
125+
*********************/
126+
127+
#ifdef XTHREEJS_PRECOMPILED
128+
#ifndef _WIN32
129+
extern template class xw::xmaterialize<xthree::xanimation_action>;
130+
extern template xw::xmaterialize<xthree::xanimation_action>::xmaterialize();
131+
extern template class xw::xtransport<xw::xmaterialize<xthree::xanimation_action>>;
132+
extern template class xw::xgenerator<xthree::xanimation_action>;
133+
extern template xw::xgenerator<xthree::xanimation_action>::xgenerator();
134+
extern template class xw::xtransport<xw::xgenerator<xthree::xanimation_action>>;
135+
#endif
136+
#endif
137+
138+
#endif
+212
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,212 @@
1+
#ifndef XTHREE_ENUMS_HPP
2+
#define XTHREE_ENUMS_HPP
3+
4+
//
5+
// This file auto-generated with generate-enums.js
6+
// Date: Fri Feb 09 2018 12:06:09 GMT+0100 (CET)
7+
//
8+
9+
#include "xwidgets/xeither.hpp"
10+
11+
namespace xthree{
12+
namespace xenums{
13+
14+
auto Equations = XEITHER(
15+
"AddEquation",
16+
"SubtractEquation",
17+
"ReverseSubtractEquation",
18+
"MinEquation",
19+
"MaxEquation",
20+
);
21+
22+
auto BlendFactors = XEITHER(
23+
"ZeroFactor",
24+
"OneFactor",
25+
"SrcColorFactor",
26+
"OneMinusSrcColorFactor",
27+
"SrcAlphaFactor",
28+
"OneMinusSrcAlphaFactor",
29+
"DstAlphaFactor",
30+
"OneMinusDstAlphaFactor",
31+
"DstColorFactor",
32+
"OneMinusDstColorFactor",
33+
"SrcAlphaSaturateFactor",
34+
);
35+
36+
auto Side = XEITHER(
37+
"FrontSide",
38+
"BackSide",
39+
"DoubleSide",
40+
);
41+
42+
auto Shading = XEITHER(
43+
"FlatShading",
44+
"SmoothShading",
45+
);
46+
47+
auto Colors = XEITHER(
48+
"NoColors",
49+
"FaceColors",
50+
"VertexColors",
51+
);
52+
53+
auto BlendingMode = XEITHER(
54+
"NoBlending",
55+
"NormalBlending",
56+
"AdditiveBlending",
57+
"SubtractiveBlending",
58+
"MultiplyBlending",
59+
"CustomBlending",
60+
);
61+
62+
auto DepthMode = XEITHER(
63+
"NeverDepth",
64+
"AlwaysDepth",
65+
"LessDepth",
66+
"LessEqualDepth",
67+
"EqualDepth",
68+
"GreaterEqualDepth",
69+
"GreaterDepth",
70+
"NotEqualDepth",
71+
);
72+
73+
auto Operations = XEITHER(
74+
"MultiplyOperation",
75+
"MixOperation",
76+
"AddOperation",
77+
);
78+
79+
auto MappingModes = XEITHER(
80+
"UVMapping",
81+
"CubeReflectionMapping",
82+
"CubeRefractionMapping",
83+
"EquirectangularReflectionMapping",
84+
"EquirectangularRefractionMapping",
85+
"SphericalReflectionMapping",
86+
"CubeUVReflectionMapping",
87+
"CubeUVRefractionMapping",
88+
);
89+
90+
auto WrappingModes = XEITHER(
91+
"RepeatWrapping",
92+
"ClampToEdgeWrapping",
93+
"MirroredRepeatWrapping",
94+
);
95+
96+
auto Filters = XEITHER(
97+
"NearestFilter",
98+
"NearestMipMapNearestFilter",
99+
"NearestMipMapLinearFilter",
100+
"LinearFilter",
101+
"LinearMipMapNearestFilter",
102+
"LinearMipMapLinearFilter",
103+
);
104+
105+
auto DataTypes = XEITHER(
106+
"UnsignedByteType",
107+
"ByteType",
108+
"ShortType",
109+
"UnsignedShortType",
110+
"IntType",
111+
"UnsignedIntType",
112+
"FloatType",
113+
"HalfFloatType",
114+
);
115+
116+
auto PixelTypes = XEITHER(
117+
"UnsignedShort4444Type",
118+
"UnsignedShort5551Type",
119+
"UnsignedShort565Type",
120+
"UnsignedInt248Type",
121+
);
122+
123+
auto PixelFormats = XEITHER(
124+
"AlphaFormat",
125+
"RGBFormat",
126+
"RGBAFormat",
127+
"LuminanceFormat",
128+
"LuminanceAlphaFormat",
129+
"DepthFormat",
130+
"DepthStencilFormat",
131+
);
132+
133+
auto DepthFormats = XEITHER(
134+
"DepthFormat",
135+
"DepthStencilFormat",
136+
);
137+
138+
auto CompressedTextureFormats = XEITHER(
139+
"RGB_S3TC_DXT1_Format",
140+
"RGBA_S3TC_DXT1_Format",
141+
"RGBA_S3TC_DXT3_Format",
142+
"RGBA_S3TC_DXT5_Format",
143+
"RGB_PVRTC_4BPPV1_Format",
144+
"RGB_PVRTC_2BPPV1_Format",
145+
"RGBA_PVRTC_4BPPV1_Format",
146+
"RGBA_PVRTC_2BPPV1_Format",
147+
"RGB_ETC1_Format",
148+
);
149+
150+
auto TextureEncodings = XEITHER(
151+
"LinearEncoding",
152+
"sRGBEncoding",
153+
"RGBEEncoding",
154+
"LogLuvEncoding",
155+
"RGBM7Encoding",
156+
"RGBM16Encoding",
157+
"RGBDEncoding",
158+
"GammaEncoding",
159+
);
160+
161+
auto CullFaceModes = XEITHER(
162+
"CullFaceNone",
163+
"CullFaceBack",
164+
"CullFaceFront",
165+
"CullFaceFrontBack",
166+
);
167+
168+
auto FrontFaceDirection = XEITHER(
169+
"FrontFaceDirectionCW",
170+
"FrontFaceDirectionCCW",
171+
);
172+
173+
auto ShadowTypes = XEITHER(
174+
"BasicShadowMap",
175+
"PCFShadowMap",
176+
"PCFSoftShadowMap",
177+
);
178+
179+
auto ToneMappings = XEITHER(
180+
"NoToneMapping",
181+
"LinearToneMapping",
182+
"ReinhardToneMapping",
183+
"Uncharted2ToneMapping",
184+
"CineonToneMapping",
185+
);
186+
187+
auto LoopModes = XEITHER(
188+
"LoopOnce",
189+
"LoopRepeat",
190+
"LoopPingPong",
191+
);
192+
193+
auto InterpolationModes = XEITHER(
194+
"InterpolateDiscrete",
195+
"InterpolateLinear",
196+
"InterpolateSmooth",
197+
);
198+
199+
auto EndingModes = XEITHER(
200+
"ZeroCurvatureEnding",
201+
"ZeroSlopeEnding",
202+
"WrapAroundEnding",
203+
);
204+
205+
auto DrawModes = XEITHER(
206+
"TrianglesDrawMode",
207+
"TriangleStripDrawMode",
208+
"TriangleFanDrawMode",
209+
);
210+
}
211+
}
212+
#endif

0 commit comments

Comments
 (0)