From f1a4f09fddd18046ab5933e034c9b5f9681fa327 Mon Sep 17 00:00:00 2001 From: Tanasart Date: Thu, 9 Nov 2023 14:12:45 +0700 Subject: [PATCH] affectors --- PixelComposer.resource_order | 1 + PixelComposer.yyp | 1 + .../d3d_gizmo_plane_falloff.gml | 14 ++++ .../node_3d_point_affector.gml | 2 +- scripts/node_registry/node_registry.gml | 2 +- .../cc497e53-a320-436d-8b85-1c4873ebfb1f.png | Bin 0 -> 2644 bytes .../605130f5-1c72-488d-a143-43e833223f94.png | Bin 0 -> 2644 bytes .../s_node_3d_point_affector.yy | 74 ++++++++++++++++++ 8 files changed, 92 insertions(+), 2 deletions(-) create mode 100644 sprites/s_node_3d_point_affector/cc497e53-a320-436d-8b85-1c4873ebfb1f.png create mode 100644 sprites/s_node_3d_point_affector/layers/cc497e53-a320-436d-8b85-1c4873ebfb1f/605130f5-1c72-488d-a143-43e833223f94.png create mode 100644 sprites/s_node_3d_point_affector/s_node_3d_point_affector.yy diff --git a/PixelComposer.resource_order b/PixelComposer.resource_order index b58cc0233..816c8f506 100644 --- a/PixelComposer.resource_order +++ b/PixelComposer.resource_order @@ -710,6 +710,7 @@ {"name":"s_node_stripe","order":16,"path":"sprites/s_node_stripe/s_node_stripe.yy",}, {"name":"s_node_lua_global","order":19,"path":"sprites/s_node_lua_global/s_node_lua_global.yy",}, {"name":"node_pb_draw_diamond","order":10,"path":"scripts/node_pb_draw_diamond/node_pb_draw_diamond.yy",}, + {"name":"s_node_3d_point_affector","order":21,"path":"sprites/s_node_3d_point_affector/s_node_3d_point_affector.yy",}, {"name":"polygon_points","order":2,"path":"scripts/polygon_points/polygon_points.yy",}, {"name":"transformBox","order":15,"path":"scripts/transformBox/transformBox.yy",}, {"name":"sh_grey_alpha","order":12,"path":"shaders/sh_grey_alpha/sh_grey_alpha.yy",}, diff --git a/PixelComposer.yyp b/PixelComposer.yyp index a5b64f2e0..e8e847852 100644 --- a/PixelComposer.yyp +++ b/PixelComposer.yyp @@ -1346,6 +1346,7 @@ {"id":{"name":"s_node_stripe","path":"sprites/s_node_stripe/s_node_stripe.yy",},}, {"id":{"name":"s_node_lua_global","path":"sprites/s_node_lua_global/s_node_lua_global.yy",},}, {"id":{"name":"node_pb_draw_diamond","path":"scripts/node_pb_draw_diamond/node_pb_draw_diamond.yy",},}, + {"id":{"name":"s_node_3d_point_affector","path":"sprites/s_node_3d_point_affector/s_node_3d_point_affector.yy",},}, {"id":{"name":"polygon_points","path":"scripts/polygon_points/polygon_points.yy",},}, {"id":{"name":"transformBox","path":"scripts/transformBox/transformBox.yy",},}, {"id":{"name":"s_node_fluidSim_group","path":"sprites/s_node_fluidSim_group/s_node_fluidSim_group.yy",},}, diff --git a/scripts/d3d_gizmo_plane_falloff/d3d_gizmo_plane_falloff.gml b/scripts/d3d_gizmo_plane_falloff/d3d_gizmo_plane_falloff.gml index b8147f500..81eb92cb0 100644 --- a/scripts/d3d_gizmo_plane_falloff/d3d_gizmo_plane_falloff.gml +++ b/scripts/d3d_gizmo_plane_falloff/d3d_gizmo_plane_falloff.gml @@ -13,14 +13,28 @@ function __3dGizmoPlaneFalloff(radius = 0.5, color = c_white, alpha = 1) : __3dG [ new __vertex( -radius, -radius, -_d, color, alpha ), new __vertex( -radius, radius, -_d, color, alpha ), + + new __vertex( -radius, radius, -_d, color, alpha ), + new __vertex( radius, radius, -_d, color, alpha ), + new __vertex( radius, radius, -_d, color, alpha ), new __vertex( radius, -radius, -_d, color, alpha ), + + new __vertex( radius, -radius, -_d, color, alpha ), + new __vertex( -radius, -radius, -_d, color, alpha ), ], [ new __vertex( -radius, -radius, _d, color, alpha ), new __vertex( -radius, radius, _d, color, alpha ), + + new __vertex( -radius, radius, _d, color, alpha ), + new __vertex( radius, radius, _d, color, alpha ), + new __vertex( radius, radius, _d, color, alpha ), new __vertex( radius, -radius, _d, color, alpha ), + + new __vertex( radius, -radius, _d, color, alpha ), + new __vertex( -radius, -radius, _d, color, alpha ), ], [ new __vertex( 0, 0, _d + 0, color, alpha ), diff --git a/scripts/node_3d_point_affector/node_3d_point_affector.gml b/scripts/node_3d_point_affector/node_3d_point_affector.gml index 6ba9e5402..609de5d81 100644 --- a/scripts/node_3d_point_affector/node_3d_point_affector.gml +++ b/scripts/node_3d_point_affector/node_3d_point_affector.gml @@ -66,7 +66,7 @@ function Node_3D_Point_Affector(_x, _y, _group = noone) : Node_3D_Object(_x, _y, gizmo_plane[0].checkParameter({ distance: _fald }); var _prot = new BBMOD_Quaternion(_rot[0], _rot[1], _rot[2], _rot[3]); - plane_normal = _prot.Rotate(new BBMOD_Vec3(0, 0, 1)); + plane_normal = _prot.Rotate(new BBMOD_Vec3(0, 0, 1)).ToArray(); } if(CURRENT_FRAME == 0) diff --git a/scripts/node_registry/node_registry.gml b/scripts/node_registry/node_registry.gml index 187402062..0c3d048d8 100644 --- a/scripts/node_registry/node_registry.gml +++ b/scripts/node_registry/node_registry.gml @@ -427,7 +427,7 @@ function NodeObject(_name, _spr, _node, _create, tags = []) constructor { #regio ///**/ addNodeObject(d3d, "3D Particle", s_node_3d_set_material, "Node_3D_Particle", [1, Node_3D_Particle]).setVersion(11560); ds_list_add(d3d, "Points"); - addNodeObject(d3d, "Point Affector", s_node_3d_discretize, "Node_3D_Point_Affector", [1, Node_3D_Point_Affector]).setVersion(11570); + addNodeObject(d3d, "Point Affector", s_node_3d_point_affector, "Node_3D_Point_Affector", [1, Node_3D_Point_Affector]).setVersion(11570); //ds_list_add(d3d, "Legacy"); ////////////////////////////////////////////////////////////////////////////////////////////////////////////// //addNodeObject(d3d, "3D Plane", s_node_3d_plane, "__Node_3D_Plane", [1, __Node_3D_Plane],, "Put 2D image on a plane in 3D space.").isDeprecated(); diff --git a/sprites/s_node_3d_point_affector/cc497e53-a320-436d-8b85-1c4873ebfb1f.png b/sprites/s_node_3d_point_affector/cc497e53-a320-436d-8b85-1c4873ebfb1f.png new file mode 100644 index 0000000000000000000000000000000000000000..35d96f86c3f4452ac078f61ec8d22630f1ff0147 GIT binary patch literal 2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^HOtSWMu}!9fnB5Ni_?#o<1w1;R zIp~zUa=bA%o@i{i7LyTeiEcZg+!7u;- literal 0 HcmV?d00001 diff --git a/sprites/s_node_3d_point_affector/layers/cc497e53-a320-436d-8b85-1c4873ebfb1f/605130f5-1c72-488d-a143-43e833223f94.png b/sprites/s_node_3d_point_affector/layers/cc497e53-a320-436d-8b85-1c4873ebfb1f/605130f5-1c72-488d-a143-43e833223f94.png new file mode 100644 index 0000000000000000000000000000000000000000..35d96f86c3f4452ac078f61ec8d22630f1ff0147 GIT binary patch literal 2644 zcmZ{mX*Ap07Qp|BAY8LoLs6lWYp8^#h$&i1YF1OZ)ErtVO@am?HPlR1(S~a%9n3RD z(ngC`DeaA0ii#@g8fu=WmwtI`y$^StbMLJ2)s4H2F%CY-U-sz+;9nF?P5;x|AOo;5IDt)~G>5Pf*DzaQ*rIN+>nw$v^&nQb8qk z0k+T}_tGl0y2ER{DIkz*Yd3R)aJZO|woJmH!K>x%0@m`u!1vK}R^Ln2PRuwJ zkFOy>ztG?<*@p*NGvsQoU?52x6*Lcg{fY08zdNG^DTE(CZBu+XL;8H2@0judUL=#_ zXHZ-2{jZE$q>kY>Lb!`Zb)3#73h^)9FaotKfz#%b98GJ1hBo@OvM)N7rce&%Oyik0HbPlX(ye9s^6>j>1G57 z7s~emR!m;h0G*&B)UjuS3k$oXg+VjVnU%2mzlFThBqraW&i+1|&xtLNIL@rNfk2Xs zDgvnu@r>%k$APY0CME&8JRt$p^MXgS>2gcsde6Xp(21yrZgH;W3w_!`c$l>7Ma@T1 zI#IjQr?u~<5ahctz)0$f9>2Y|nW5~vJW7(9vT#R)+yjXYck7k*cwu_Nqj*I*SXmtR zAIbG@r)MtJq@qTaX;EGuYXV2(hY$|e!TOA7X0z+fk7BwgQVb0hwn@vtz8Y#&fG8(L z%M_=JaKbF)Ry$fho6BUORG+|LkRcd26F>)te_UPZS!r$YK)v~FfvvlC@b->V5zFo- zxC~NOgPiu{{Q?c~>DoBOV+fcmPZX8czS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x3PUB?)P1B9j1rVIKNdW9Q&-TlYhl;qhWufMe*witDf@CDZ)tK(^W9{bm0^ z?x%lxHx!4klZ;0uqA5RAm39{wt!h40&pN*$L`;Af%n9MNTnU<#k9Z%+yaT zT%YJSxgl$VLbU5SDPSdwsPx;BzC^c_12YQ6Z|12jkLO6##AHdG(WNO0A!uWu2sGbn z*s;)eZOr)!J(^x<2zRUZejEOBdyjxNNX5nrfb7}=?4B#D6$IQA%4`V#Jzun*t_ zDZ49@F^?qMqe%0$*uj^%1r|=V;W`5^Y0C@34ab^HOtSWMu}!9fnB5Ni_?#o<1w1;R zIp~zUa=bA%o@i{i7LyTeiEcZg+!7u;- literal 0 HcmV?d00001 diff --git a/sprites/s_node_3d_point_affector/s_node_3d_point_affector.yy b/sprites/s_node_3d_point_affector/s_node_3d_point_affector.yy new file mode 100644 index 000000000..eda8dce41 --- /dev/null +++ b/sprites/s_node_3d_point_affector/s_node_3d_point_affector.yy @@ -0,0 +1,74 @@ +{ + "resourceType": "GMSprite", + "resourceVersion": "1.0", + "name": "s_node_3d_point_affector", + "bbox_bottom": 59, + "bbox_left": 4, + "bbox_right": 61, + "bbox_top": 4, + "bboxMode": 0, + "collisionKind": 1, + "collisionTolerance": 0, + "DynamicTexturePage": false, + "edgeFiltering": false, + "For3D": false, + "frames": [ + {"resourceType":"GMSpriteFrame","resourceVersion":"1.1","name":"cc497e53-a320-436d-8b85-1c4873ebfb1f",}, + ], + "gridX": 0, + "gridY": 0, + "height": 64, + "HTile": false, + "layers": [ + {"resourceType":"GMImageLayer","resourceVersion":"1.0","name":"605130f5-1c72-488d-a143-43e833223f94","blendMode":0,"displayName":"default","isLocked":false,"opacity":100.0,"visible":true,}, + ], + "nineSlice": null, + "origin": 4, + "parent": { + "name": "3D", + "path": "folders/nodes/icons/3D.yy", + }, + "preMultiplyAlpha": false, + "sequence": { + "resourceType": "GMSequence", + "resourceVersion": "1.4", + "name": "s_node_3d_point_affector", + "autoRecord": true, + "backdropHeight": 768, + "backdropImageOpacity": 0.5, + "backdropImagePath": "", + "backdropWidth": 1366, + "backdropXOffset": 0.0, + "backdropYOffset": 0.0, + "events": {"resourceType":"KeyframeStore","resourceVersion":"1.0","Keyframes":[],}, + "eventStubScript": null, + "eventToFunction": {}, + "length": 1.0, + "lockOrigin": false, + "moments": {"resourceType":"KeyframeStore","resourceVersion":"1.0","Keyframes":[],}, + "playback": 1, + "playbackSpeed": 30.0, + "playbackSpeedType": 0, + "showBackdrop": true, + "showBackdropImage": false, + "timeUnits": 1, + "tracks": [ + {"resourceType":"GMSpriteFramesTrack","resourceVersion":"1.0","name":"frames","builtinName":0,"events":[],"inheritsTrackColour":true,"interpolation":1,"isCreationTrack":false,"keyframes":{"resourceType":"KeyframeStore","resourceVersion":"1.0","Keyframes":[ + {"resourceType":"Keyframe","resourceVersion":"1.0","Channels":{"0":{"resourceType":"SpriteFrameKeyframe","resourceVersion":"1.0","Id":{"name":"cc497e53-a320-436d-8b85-1c4873ebfb1f","path":"sprites/s_node_3d_point_affector/s_node_3d_point_affector.yy",},},},"Disabled":false,"id":"6911bb1c-bfd2-4198-99a8-786a0aa40e79","IsCreationKey":false,"Key":0.0,"Length":1.0,"Stretch":false,}, + ],},"modifiers":[],"spriteId":null,"trackColour":0,"tracks":[],"traits":0,}, + ], + "visibleRange": null, + "volume": 1.0, + "xorigin": 32, + "yorigin": 32, + }, + "swatchColours": null, + "swfPrecision": 2.525, + "textureGroupId": { + "name": "Default", + "path": "texturegroups/Default", + }, + "type": 0, + "VTile": false, + "width": 64, +} \ No newline at end of file