Skip to content

Commit

Permalink
Let Halloween child out of canvas.
Browse files Browse the repository at this point in the history
  • Loading branch information
create3000 committed Dec 14, 2024
1 parent cb8eeb4 commit 8816f57
Show file tree
Hide file tree
Showing 4 changed files with 85 additions and 17 deletions.
13 changes: 13 additions & 0 deletions docs/_posts/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,19 @@ permalink: /
contentScale="auto"
xrSessionMode="NONE">
</x3d-canvas>
<div class="mascot-wrapper">
<x3d-canvas
class="mascot"
src="/x_ite/assets/teaser/halloween-child.x3d"
update="auto"
splashScreen="false"
contextMenu="false"
notifications="false"
timings="false"
contentScale="auto"
xrSessionMode="NONE">
</x3d-canvas>
</div>
Credits: [Jonás](https://sketchfab.com/jonasaguilar) (Halloween child)
{: .small }

Expand Down
23 changes: 20 additions & 3 deletions docs/assets/css/jekyll-theme-chirpy.scss
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,8 @@ small, .small {
aspect-ratio: 16 / 9;
}

/* xr-button */

x3d-canvas.xr-button-tr::part(xr-button) {
top: 10px;
right: 10px;
Expand Down Expand Up @@ -261,14 +263,29 @@ x3d-canvas.xr-button-tl::part(xr-button) {
left: 10px;
}

.content x3d-canvas.teaser {
aspect-ratio: 16 / 5;
/* teaser */

.content .teaser,
.content .mascot {
aspect-ratio: 16 / 5;
}

.content x3d-canvas.teaser::part(surface) {
.content .teaser::part(surface) {
cursor: default !important;
}

.content .mascot-wrapper {
position: relative;
}

.content .mascot {
pointer-events: none;
position: absolute;
transform: translateY(-65%);
}

/* */

span[data-label-text="X3D" i],
span[data-label-text="VRML" i] {
text-transform: uppercase;
Expand Down
51 changes: 51 additions & 0 deletions docs/assets/teaser/halloween-child.x3d
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE X3D PUBLIC "ISO//Web3D//DTD X3D 4.0//EN" "https://www.web3d.org/specifications/x3d-4.0.dtd">
<X3D profile='Interchange' version='4.0' xmlns:xsd='http://www.w3.org/2001/XMLSchema-instance' xsd:noNamespaceSchemaLocation='https://www.web3d.org/specifications/x3d-4.0.xsd'>
<head>
<meta name='created' content='Sat, 14 Dec 2024 18:52:06 GMT'/>
<meta name='creator' content='Holger Seelig'/>
<meta name='generator' content='Sunrize X3D Editor V1.7.36, https://create3000.github.io/sunrize/'/>
<meta name='modified' content='Sat, 14 Dec 2024 18:57:43 GMT'/>
</head>
<Scene>
<WorldInfo>
<MetadataSet containerField='metadata'
name='Sunrize'
reference='https://create3000.github.io/sunrize/'>
<MetadataSet
name='BrowserFrame'>
<MetadataBoolean
name='fixedSize'
value='true'/>
<MetadataDouble
name='aspectRatio'
value='780, 245'/>
<MetadataString
name='backgroundColor'
value='""'/>
</MetadataSet>
</MetadataSet>
</WorldInfo>
<NavigationInfo
type='"NONE"'/>
<Background
transparency='1'/>
<Transform
translation='-4.079085 2.505181 -1.181229'
scale='1.701448 1.701448 1.701448'>
<Transform DEF='HalloweenChild'
translation='5.815239 -23.80504 2'
rotation='0 -1 0 0.549344416768186'
scale='0.08 0.08 0.08'
center='0 22.54239 -0.3160129'>
<Inline DEF='_7'
url='"viernes.glb.gz"'/>
<LoadSensor DEF='_8'>
<Inline USE='_7'/>
</LoadSensor>
</Transform>
</Transform>
<IMPORT inlineDEF='_7' importedDEF='Timer1' AS='HalloweenChildTimer'/>
<ROUTE fromNode='_8' fromField='isLoaded' toNode='HalloweenChildTimer' toField='set_loop'/>
</Scene>
</X3D>
15 changes: 1 addition & 14 deletions docs/assets/teaser/teaser.x3d
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<meta name='creator' content='Holger Seelig'/>
<meta name='generator' content='Sunrize X3D Editor V1.7.36, https://create3000.github.io/sunrize/'/>
<meta name='identifier' content='file:///Users/holger/Desktop/X_ITE/x_ite/docs/assets/X3D/teaser.x3d'/>
<meta name='modified' content='Sat, 14 Dec 2024 13:00:40 GMT'/>
<meta name='modified' content='Sat, 14 Dec 2024 18:54:40 GMT'/>
</head>
<Scene>
<WorldInfo
Expand Down Expand Up @@ -111,22 +111,9 @@ function initialize ()
]]>
</Script>
</Transform>
<Transform DEF='HalloweenChild'
translation='5.815239 -23.80504 2'
rotation='0 -1 0 31.4751165798928'
scale='0.08 0.08 0.08'
center='0 22.54239 -0.3160129'>
<Inline DEF='_7'
url='"viernes.glb.gz"'/>
<LoadSensor DEF='_8'>
<Inline USE='_7'/>
</LoadSensor>
</Transform>
<IMPORT inlineDEF='_7' importedDEF='Timer1' AS='HalloweenChildTimer'/>
<ROUTE fromNode='X_ITE' fromField='string_changed' toNode='_5' toField='set_string'/>
<ROUTE fromNode='_6' fromField='touchTime' toNode='_2' toField='set_startTime'/>
<ROUTE fromNode='_2' fromField='fraction_changed' toNode='_3' toField='set_fraction'/>
<ROUTE fromNode='_3' fromField='value_changed' toNode='Text' toField='set_rotation'/>
<ROUTE fromNode='_8' fromField='isLoaded' toNode='HalloweenChildTimer' toField='set_loop'/>
</Scene>
</X3D>

0 comments on commit 8816f57

Please sign in to comment.