1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/spinningcube/nbactions-iOS.xml Tue Aug 13 15:17:28 2013 +0200
1.3 @@ -0,0 +1,51 @@
1.4 +<?xml version="1.0" encoding="UTF-8"?>
1.5 +<!--
1.6 +
1.7 + The MIT License (MIT)
1.8 +
1.9 + Copyright (C) 2013 Jaroslav Tulach <jaroslav.tulach@apidesign.org>
1.10 +
1.11 + Permission is hereby granted, free of charge, to any person obtaining a copy
1.12 + of this software and associated documentation files (the "Software"), to deal
1.13 + in the Software without restriction, including without limitation the rights
1.14 + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
1.15 + copies of the Software, and to permit persons to whom the Software is
1.16 + furnished to do so, subject to the following conditions:
1.17 +
1.18 + The above copyright notice and this permission notice shall be included in
1.19 + all copies or substantial portions of the Software.
1.20 +
1.21 + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
1.22 + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
1.23 + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
1.24 + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
1.25 + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
1.26 + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
1.27 + THE SOFTWARE.
1.28 +
1.29 +-->
1.30 +<actions>
1.31 + <action>
1.32 + <actionName>run</actionName>
1.33 + <goals>
1.34 + <goal>package</goal>
1.35 + <goal>org.netbeans.ios:ios-maven-plugin:0.2:deploy</goal>
1.36 + </goals>
1.37 + <properties>
1.38 + <skipTests>true</skipTests>
1.39 + </properties>
1.40 + </action>
1.41 + <action>
1.42 + <actionName>debug</actionName>
1.43 + <goals>
1.44 + <goal>package</goal>
1.45 + <goal>org.netbeans.ios:ios-maven-plugin:0.2:deploy</goal>
1.46 + </goals>
1.47 + <properties>
1.48 + <skipTests>true</skipTests>
1.49 + <jpda.listen>true</jpda.listen>
1.50 + <jpdaAddress>${jpda.address}</jpdaAddress>
1.51 + <runMode>Debug</runMode>
1.52 + </properties>
1.53 + </action>
1.54 +</actions>
1.55 \ No newline at end of file
2.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
2.2 +++ b/spinningcube/nbactions.xml Tue Aug 13 15:17:28 2013 +0200
2.3 @@ -0,0 +1,45 @@
2.4 +<?xml version="1.0" encoding="UTF-8"?>
2.5 +<!--
2.6 +
2.7 + The MIT License (MIT)
2.8 +
2.9 + Copyright (C) 2013 Jaroslav Tulach <jaroslav.tulach@apidesign.org>
2.10 +
2.11 + Permission is hereby granted, free of charge, to any person obtaining a copy
2.12 + of this software and associated documentation files (the "Software"), to deal
2.13 + in the Software without restriction, including without limitation the rights
2.14 + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
2.15 + copies of the Software, and to permit persons to whom the Software is
2.16 + furnished to do so, subject to the following conditions:
2.17 +
2.18 + The above copyright notice and this permission notice shall be included in
2.19 + all copies or substantial portions of the Software.
2.20 +
2.21 + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
2.22 + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
2.23 + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
2.24 + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
2.25 + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
2.26 + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
2.27 + THE SOFTWARE.
2.28 +
2.29 +-->
2.30 +<actions>
2.31 + <action>
2.32 + <actionName>run</actionName>
2.33 + <goals>
2.34 + <goal>process-classes</goal>
2.35 + <goal>exec:java</goal>
2.36 + </goals>
2.37 + </action>
2.38 + <action>
2.39 + <actionName>debug</actionName>
2.40 + <goals>
2.41 + <goal>process-classes</goal>
2.42 + <goal>exec:java</goal>
2.43 + </goals>
2.44 + <properties>
2.45 + <jpda.listen>maven</jpda.listen>
2.46 + </properties>
2.47 + </action>
2.48 +</actions>
3.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
3.2 +++ b/spinningcube/pom.xml Tue Aug 13 15:17:28 2013 +0200
3.3 @@ -0,0 +1,148 @@
3.4 +<?xml version="1.0" encoding="UTF-8"?>
3.5 +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
3.6 + <modelVersion>4.0.0</modelVersion>
3.7 + <parent>
3.8 + <artifactId>demo</artifactId>
3.9 + <groupId>org.apidesign.html</groupId>
3.10 + <version>1.0-SNAPSHOT</version>
3.11 + </parent>
3.12 +
3.13 + <groupId>org.apidesign.demo</groupId>
3.14 + <artifactId>spinningcube</artifactId>
3.15 + <version>1.0-SNAPSHOT</version>
3.16 + <packaging>jar</packaging>
3.17 +
3.18 + <name>Spinning_Cube</name>
3.19 +
3.20 + <pluginRepositories>
3.21 + <pluginRepository>
3.22 + <id>ios</id>
3.23 + <name>NetBeans iOS Maven Plugin</name>
3.24 + <url>http://beetle.cz.oracle.com/~jtulach/maven/</url>
3.25 + <snapshots>
3.26 + </snapshots>
3.27 + </pluginRepository>
3.28 + </pluginRepositories>
3.29 +
3.30 + <properties>
3.31 + <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
3.32 + <net.java.html.version>0.4</net.java.html.version>
3.33 + <project.mainclass>org.apidesign.demo.spinningcube.Main</project.mainclass>
3.34 + <netbeans.compile.on.save>none</netbeans.compile.on.save>
3.35 + </properties>
3.36 + <build>
3.37 + <plugins>
3.38 + <plugin>
3.39 + <groupId>org.apache.maven.plugins</groupId>
3.40 + <artifactId>maven-compiler-plugin</artifactId>
3.41 + <version>2.3.2</version>
3.42 + <configuration>
3.43 + <source>1.7</source>
3.44 + <target>1.7</target>
3.45 + </configuration>
3.46 + </plugin>
3.47 + <plugin>
3.48 + <groupId>org.apache.maven.plugins</groupId>
3.49 + <artifactId>maven-jar-plugin</artifactId>
3.50 + <version>2.4</version>
3.51 + <configuration>
3.52 + <archive>
3.53 + <manifest>
3.54 + <mainClass>${project.mainclass}</mainClass>
3.55 + <addClasspath>true</addClasspath>
3.56 + <classpathPrefix>lib/</classpathPrefix>
3.57 + </manifest>
3.58 + </archive>
3.59 + </configuration>
3.60 + </plugin>
3.61 + <plugin>
3.62 + <groupId>org.codehaus.mojo</groupId>
3.63 + <artifactId>exec-maven-plugin</artifactId>
3.64 + <version>1.2.1</version>
3.65 + <configuration>
3.66 + <systemProperties>
3.67 + <systemProperty>
3.68 + <key>browser.rootdir</key>
3.69 + <value>${basedir}/src/main/webapp/</value>
3.70 + </systemProperty>
3.71 + </systemProperties>
3.72 + <mainClass>${project.mainclass}</mainClass>
3.73 + </configuration>
3.74 + </plugin>
3.75 + <plugin>
3.76 + <artifactId>maven-assembly-plugin</artifactId>
3.77 + <version>2.4</version>
3.78 + <executions>
3.79 + <execution>
3.80 + <id>distro-assembly</id>
3.81 + <phase>package</phase>
3.82 + <goals>
3.83 + <goal>single</goal>
3.84 + </goals>
3.85 + <configuration>
3.86 + <descriptors>
3.87 + <descriptor>src/main/assembly/html.java.net.xml</descriptor>
3.88 + </descriptors>
3.89 + </configuration>
3.90 + </execution>
3.91 + </executions>
3.92 + </plugin>
3.93 + </plugins>
3.94 + </build>
3.95 + <dependencies>
3.96 + <dependency>
3.97 + <groupId>org.apidesign.html</groupId>
3.98 + <artifactId>net.java.html.json</artifactId>
3.99 + <version>${net.java.html.version}</version>
3.100 + </dependency>
3.101 + <dependency>
3.102 + <groupId>org.apidesign.html</groupId>
3.103 + <artifactId>net.java.html.boot</artifactId>
3.104 + <version>${net.java.html.version}</version>
3.105 + </dependency>
3.106 + <dependency>
3.107 + <groupId>org.apidesign.html</groupId>
3.108 + <artifactId>ko-fx</artifactId>
3.109 + <version>${net.java.html.version}</version>
3.110 + <scope>runtime</scope>
3.111 + </dependency>
3.112 + <dependency>
3.113 + <groupId>org.apidesign.html</groupId>
3.114 + <artifactId>boot-fx</artifactId>
3.115 + <version>${net.java.html.version}</version>
3.116 + <scope>runtime</scope>
3.117 + </dependency>
3.118 + <dependency>
3.119 + <groupId>org.testng</groupId>
3.120 + <artifactId>testng</artifactId>
3.121 + <version>6.7</version>
3.122 + <scope>test</scope>
3.123 + </dependency>
3.124 + </dependencies>
3.125 + <profiles>
3.126 + <profile>
3.127 + <id>iOS</id>
3.128 + <activation>
3.129 + <os>
3.130 + <family>mac</family>
3.131 + <name>Mac OS X</name>
3.132 + </os>
3.133 + </activation>
3.134 + <build>
3.135 + <plugins>
3.136 + <plugin>
3.137 + <groupId>org.netbeans.ios</groupId>
3.138 + <artifactId>ios-maven-plugin</artifactId>
3.139 + <version>0.2</version>
3.140 + <configuration>
3.141 + <jarfile>${project.build.directory}/${project.build.finalName}.jar</jarfile>
3.142 + <title>${project.name}</title>
3.143 + <mainclass>${project.mainclass}</mainclass>
3.144 + <resourcesDir>src/main/webapp/</resourcesDir>
3.145 + </configuration>
3.146 + </plugin>
3.147 + </plugins>
3.148 + </build>
3.149 + </profile>
3.150 + </profiles>
3.151 +</project>
4.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
4.2 +++ b/spinningcube/src/main/assembly/html.java.net.xml Tue Aug 13 15:17:28 2013 +0200
4.3 @@ -0,0 +1,57 @@
4.4 +<?xml version="1.0"?>
4.5 +<!--
4.6 +
4.7 + The MIT License (MIT)
4.8 +
4.9 + Copyright (C) 2013 Jaroslav Tulach <jaroslav.tulach@apidesign.org>
4.10 +
4.11 + Permission is hereby granted, free of charge, to any person obtaining a copy
4.12 + of this software and associated documentation files (the "Software"), to deal
4.13 + in the Software without restriction, including without limitation the rights
4.14 + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
4.15 + copies of the Software, and to permit persons to whom the Software is
4.16 + furnished to do so, subject to the following conditions:
4.17 +
4.18 + The above copyright notice and this permission notice shall be included in
4.19 + all copies or substantial portions of the Software.
4.20 +
4.21 + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
4.22 + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
4.23 + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
4.24 + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
4.25 + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
4.26 + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
4.27 + THE SOFTWARE.
4.28 +
4.29 +-->
4.30 +<assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4.31 + xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2 http://maven.apache.org/xsd/assembly-1.1.2.xsd">
4.32 +
4.33 + <id>html.java.net</id>
4.34 + <formats>
4.35 + <format>zip</format>
4.36 + </formats>
4.37 + <baseDirectory>${project.build.finalName}-app</baseDirectory>
4.38 + <dependencySets>
4.39 + <dependencySet>
4.40 + <useProjectArtifact>false</useProjectArtifact>
4.41 + <scope>runtime</scope>
4.42 + <outputDirectory>lib</outputDirectory>
4.43 + </dependencySet>
4.44 + </dependencySets>
4.45 + <files>
4.46 + <file>
4.47 + <source>${project.build.directory}/${project.build.finalName}.jar</source>
4.48 + <outputDirectory>/</outputDirectory>
4.49 + </file>
4.50 + </files>
4.51 + <fileSets>
4.52 + <fileSet>
4.53 + <directory>src/main/webapp/</directory>
4.54 + <outputDirectory>/</outputDirectory>
4.55 + <includes>
4.56 + <include>pages/**</include>
4.57 + </includes>
4.58 + </fileSet>
4.59 + </fileSets>
4.60 +</assembly>
4.61 \ No newline at end of file
5.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
5.2 +++ b/spinningcube/src/main/java/org/apidesign/demo/spinningcube/DataModel.java Tue Aug 13 15:17:28 2013 +0200
5.3 @@ -0,0 +1,46 @@
5.4 +/**
5.5 + * The MIT License (MIT)
5.6 + *
5.7 + * Copyright (C) 2013 Jaroslav Tulach <jaroslav.tulach@apidesign.org>
5.8 + *
5.9 + * Permission is hereby granted, free of charge, to any person obtaining a copy
5.10 + * of this software and associated documentation files (the "Software"), to deal
5.11 + * in the Software without restriction, including without limitation the rights
5.12 + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
5.13 + * copies of the Software, and to permit persons to whom the Software is
5.14 + * furnished to do so, subject to the following conditions:
5.15 + *
5.16 + * The above copyright notice and this permission notice shall be included in
5.17 + * all copies or substantial portions of the Software.
5.18 + *
5.19 + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
5.20 + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
5.21 + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
5.22 + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
5.23 + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
5.24 + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
5.25 + * THE SOFTWARE.
5.26 + */
5.27 +package org.apidesign.demo.spinningcube;
5.28 +
5.29 +import net.java.html.json.ComputedProperty;
5.30 +import net.java.html.json.Model;
5.31 +import net.java.html.json.Property;
5.32 +
5.33 +/** Model with one message and cube with six sides.
5.34 + *
5.35 + * @author Jaroslav Tulach <jaroslav.tulach@apidesign.org>
5.36 + */
5.37 +@Model(className = "Data", properties = {
5.38 + @Property(name = "message", type = String.class),
5.39 +})
5.40 +final class DataModel {
5.41 + @ComputedProperty static String[] sides(String message) {
5.42 + String[] arr = new String[6];
5.43 + String[] words = message == null ? new String[0] : message.split(" ", 6);
5.44 + for (int i = 0; i < 6; i++) {
5.45 + arr[i] = words.length > i ? words[i] : "!";
5.46 + }
5.47 + return arr;
5.48 + }
5.49 +}
6.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
6.2 +++ b/spinningcube/src/main/java/org/apidesign/demo/spinningcube/Main.java Tue Aug 13 15:17:28 2013 +0200
6.3 @@ -0,0 +1,53 @@
6.4 +/**
6.5 + * The MIT License (MIT)
6.6 + *
6.7 + * Copyright (C) 2013 Jaroslav Tulach <jaroslav.tulach@apidesign.org>
6.8 + *
6.9 + * Permission is hereby granted, free of charge, to any person obtaining a copy
6.10 + * of this software and associated documentation files (the "Software"), to deal
6.11 + * in the Software without restriction, including without limitation the rights
6.12 + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
6.13 + * copies of the Software, and to permit persons to whom the Software is
6.14 + * furnished to do so, subject to the following conditions:
6.15 + *
6.16 + * The above copyright notice and this permission notice shall be included in
6.17 + * all copies or substantial portions of the Software.
6.18 + *
6.19 + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
6.20 + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
6.21 + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
6.22 + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
6.23 + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
6.24 + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
6.25 + * THE SOFTWARE.
6.26 + */
6.27 +package org.apidesign.demo.spinningcube;
6.28 +
6.29 +import net.java.html.boot.BrowserBuilder;
6.30 +
6.31 +
6.32 +/** Bootstrap and initialization.
6.33 + *
6.34 + * @author Jaroslav Tulach <jaroslav.tulach@apidesign.org>
6.35 + */
6.36 +public final class Main {
6.37 + private Main() {
6.38 + }
6.39 +
6.40 + /** Launches the browser */
6.41 + public static void main(String... args) throws Exception {
6.42 + BrowserBuilder.newBrowser().
6.43 + loadPage("pages/index.html").
6.44 + loadClass(Main.class).
6.45 + invoke("initialize", args).
6.46 + showAndWait();
6.47 + System.exit(0);
6.48 + }
6.49 +
6.50 + /** Called when page is ready */
6.51 + public static void initialize(String... args) throws Exception {
6.52 + Data d = new Data();
6.53 + d.setMessage("Java and HTML go well together!");
6.54 + d.applyBindings();
6.55 + }
6.56 +}
7.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
7.2 +++ b/spinningcube/src/main/webapp/pages/index.html Tue Aug 13 15:17:28 2013 +0200
7.3 @@ -0,0 +1,92 @@
7.4 +<!--
7.5 +
7.6 + The MIT License (MIT)
7.7 +
7.8 + Copyright (C) 2013 Jaroslav Tulach <jaroslav.tulach@apidesign.org>
7.9 +
7.10 + Permission is hereby granted, free of charge, to any person obtaining a copy
7.11 + of this software and associated documentation files (the "Software"), to deal
7.12 + in the Software without restriction, including without limitation the rights
7.13 + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7.14 + copies of the Software, and to permit persons to whom the Software is
7.15 + furnished to do so, subject to the following conditions:
7.16 +
7.17 + The above copyright notice and this permission notice shall be included in
7.18 + all copies or substantial portions of the Software.
7.19 +
7.20 + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
7.21 + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
7.22 + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
7.23 + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
7.24 + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
7.25 + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
7.26 + THE SOFTWARE.
7.27 +
7.28 +-->
7.29 +<!DOCTYPE html>
7.30 +<html>
7.31 + <head>
7.32 + <title></title>
7.33 + <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
7.34 +
7.35 + <style type="text/css">
7.36 +
7.37 + #stage {
7.38 + margin: 1em auto;
7.39 + -webkit-perspective: 1200px;
7.40 + -moz-perspective: 1200px;
7.41 +
7.42 + }
7.43 +
7.44 + #spinner div {
7.45 + position: absolute;
7.46 + width: 300px;
7.47 + height: 300px;
7.48 + border: 1px solid #ccc;
7.49 + background: rgba(255,255,155,0.8);
7.50 + text-align: center;
7.51 + line-height: 300px;
7.52 + font-size: 80px;
7.53 + -webkit-box-shadow: inset 0 0 40px rgba(0,0,0,0.4);
7.54 + }
7.55 +
7.56 + #spinner div:nth-child(1) { -webkit-transform: translateZ(150px); }
7.57 + #spinner div:nth-child(2) { -webkit-transform: rotateY(90deg) translateZ(150px); }
7.58 + #spinner div:nth-child(3) { -webkit-transform: rotateY(90deg) rotateX(90deg) translateZ(150px); }
7.59 + #spinner div:nth-child(4) { -webkit-transform: rotateY(180deg) rotateZ(90deg) translateZ(150px); }
7.60 + #spinner div:nth-child(5) { -webkit-transform: rotateY(-90deg) rotateZ(90deg) translateZ(150px); }
7.61 + #spinner div:nth-child(6) { -webkit-transform: rotateX(-90deg) translateZ(150px); }
7.62 +
7.63 + @-webkit-keyframes spincube {
7.64 + from,to { }
7.65 + 16% { -webkit-transform: rotateY(-90deg); }
7.66 + 33% { -webkit-transform: rotateY(-90deg) rotateZ(90deg); }
7.67 + 50% { -webkit-transform: rotateY(180deg) rotateZ(90deg); }
7.68 + 66% { -webkit-transform: rotateY(90deg) rotateX(90deg); }
7.69 + 83% { -webkit-transform: rotateX(90deg); }
7.70 + }
7.71 +
7.72 + #spinner {
7.73 + -webkit-animation-name: spincube;
7.74 + -webkit-animation-timing-function: ease-in-out;
7.75 + -webkit-animation-iteration-count: infinite;
7.76 + -webkit-animation-duration: 12s;
7.77 + -webkit-transform-style: preserve-3d;
7.78 + -webkit-transform-origin: 150px 150px 0;
7.79 + }
7.80 +
7.81 + </style>
7.82 +
7.83 + </head>
7.84 + <body>
7.85 + <h1>Spinning Cube Demo</h1>
7.86 + <input data-bind="value: message, valueUpdate: 'afterkeydown'" size="100">
7.87 + <div style="position: relative; top:62px;">
7.88 + <div id="stage" style="width: 300px; height: 300px;">
7.89 + <div id="spinner" data-bind="foreach: sides ">
7.90 + <div data-bind="text: $data"></div>
7.91 + </div>
7.92 + </div>
7.93 + </div>
7.94 + </body>
7.95 +</html>